package dao_.dao;

import dao_.domain.Performer;

import java.util.List;

/**
 * @author DCSGO
 * @version 1.0
 */
public class PerformerDAO extends BasicDAO<Performer> {
    public void showPerformers() {
        List<Performer> performers = this.queryMulti("select * from performer", Performer.class);
        for (Performer p : performers) {
            System.out.print(p);
        }
        System.out.println();
    }

    public int insert(Performer performer) {
        return this.update("insert into performer values (?,?,?,?,?)",
                performer.getId(), performer.getName(), performer.getSex(),
                performer.getBirthday(), performer.getPhone_number());
    }
}
